<td class="sf_admin_text sf_admin_list_td_id">
  <?php echo _link('@customar_order?action=edit&pk='.$customar_order->getPrimaryKey())->text(htmlentities(dmString::truncate($customar_order->get('id'), 120), ENT_COMPAT, 'UTF-8'))->addClass('link_edit') ?>
</td>
<td class="sf_admin_foreignkey sf_admin_list_td_customer_id">
  <?php echo $customar_order->get('customer_id') ? ($sf_user->canAccessToModule('dmUser')
? _link($customar_order->get('DmUser'))
->text($customar_order->get('DmUser')->__toString())
->set('.associated_record.s16right.s16_arrow_up_right_medium')
: $customar_order->get('DmUser')) : '-' ?>
</td>
<td class="sf_admin_text sf_admin_list_td_products_list">
<div class="dm_related_records">
    <ul>
        <?php
            $products = $customar_order->get('Products');
          //  foreach($products as $product):
        ?>
        <li>
            <ul>
            
                <?php
                //echo $customar_order->get('create_at');
                    foreach($customar_order->CustomarOrderProducts as $customarOrderProduct)
                    {
                        $html  = '<li><span>'.$customarOrderProduct->Product.'</span>'.' , <b>Color:</b> '.$customarOrderProduct->color;
                        $html  .= ' , <b>Size:</b> '.$customarOrderProduct->size;
                        $html  .= ' , <b>Quantity:</b> '.$customarOrderProduct->quantity.'</li>';
                        echo $html;
                    }
                ?>
            </ul>
        </li>
        <?php // endforeach;?>
    </ul>
</div>
  <?php
//  echo $sf_context->getServiceContainer()->mergeParameter('related_records_view.options', array(
//  'record' => $customar_order,
//  'alias'  => 'Products'
//))->getService('related_records_view')->render()
          ?>
</td>
 
<td class="sf_admin_text sf_admin_list_td_total_cost">
  <?php echo htmlentities(dmString::truncate($customar_order->get('total_cost'), 120), ENT_COMPAT, 'UTF-8') ?>
</td>
<td class="sf_admin_enum sf_admin_list_td_status">
  <?php echo htmlentities(dmString::truncate($customar_order->get('status'), 120), ENT_COMPAT, 'UTF-8') ?>
</td>
 
<td class="sf_admin_date sf_admin_list_td_created_at">
  <?php echo false !== strtotime($customar_order->get('created_at')) ? format_date($customar_order->get('created_at'), "f") : '&nbsp;' ?>
</td>
<td class="sf_admin_date sf_admin_list_td_updated_at">
  <?php echo false !== strtotime($customar_order->get('updated_at')) ? format_date($customar_order->get('updated_at'), "f") : '&nbsp;' ?>
</td>
